home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <dos.h>
- #include <fcntl.h>
- #include <sys\types.h>
- #include <sys\stat.h>
- #include <ctype.h>
- #include "scr.h"
- #define min(a, b) ( (a <= b) ? a : b)
- #define max(a, b) ( a <b) ? b : a)
- #define NROWS 24
- #define BAD -1
- #define GOOD 1
- #define NCOLS 80
- #define true 1
- #define false 0
- #define rom_call 0x10
- #define HILIT_ON 8
- #define BLINK 128 /* may be 176 */
- #define REVERSE 0x70
- #define NORMAL 7
- #define HIGHLIGHT 15
- #define BHIGHLIGHT 184
- #define UNDERLINE 1
- #define clear() (wclear(stdscr))
- #define move(c, c1) (wmove(stdscr, c, c1))
- #define mvclear(x, y) move(x, y); clrtoeol(); refresh()
- #define mvprint(x, y,s) move(x,y); addstr(s)
- #define wmvprint(a, x, y, s) wmove(a, x, y); waddstr(s)
- #define delch() (wdelch(stdscr))
- #define deleteln() (wdeleteln(stdscr))
- #define addch(c) (waddch(stdscr, c))
- #define clrtoeol() (wclrtoeol(stdscr))
- #define clrtobot() (wclrtobot(stdscr))
- #define insertln() (winsertln(stdscr))
- #define insch(c) (winsch(stdscr, c))
- #define inch() (winch(stdscr))
- #define standout() (wstandout(stdscr))
- #define standend() (wstandend(stdscr))
- #define scroll() (wscroll(stdscr))
- #define echo() (0)
- #define noecho() (0)
- #define nl() (0)
- #define nonl() (0)
- #define addstr(s) (waddstr(stdscr, s))
- #define refresh() (wrefresh(stdscr))
-
- #define CTRLA 1
- #define CTRLB 2
- #define CTRLC 3
- #define CTRLD 4
- #define CTRLE 5
- #define CTRLF 6
- #define CTRLG 7
- #define CTRLH 8
- #define CTRLI 9
- #define CTRLJ 10
- #define CTRLK 11
- #define CTRLL 12
- #define CTRLM 13
- #define CTRLN 14
- #define CTRLO 15
- #define CTRLP 16
- #define CTRLQ 17
- #define CTRLR 18
- #define CTRLS 19
- #define CTRLT 20
- #define CTRLU 21
- #define CTRLV 22
- #define CTRLW 23
- #define CTRLX 24
- #define CTRLY 25
- #define CTRLZ 26
- extern char *malloc(), *scr_buff, *strchr(), *strcat();
-
- extern int nkey, key_code[100][5], retrace;
-
-
- typedef struct win_struct {
- int row_org, col_org;
- int row_max, col_max;
- int row, col;
- int first_row, first_col;
- int last_row, last_col;
- int first_pos, last_pos;
- int char_pos; /* current char position */
- char *buff; /* current buffer */
- int no_change;
- int buff_len; /* total buffer lenght */
- int attrib; /* atrribute */
- int scroll_fl; /* scroll flag */
- int box_flag; /* box flag */
- struct win_struct *next;
- } Window;
-
- extern Window *stdscr, *firstw, *newwin(), *curr_wind;